package com.mtt.thirdapi.yanxuan.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * 读取严选配置文件
 */

@Component
public class YxConfig {
    public static String appKey;
    public static String appSecret;
    public static String yxOpenApiHost;
    public static String path;
    public static String getMethodIds;
    public static String getMethodItems;
    public static String getItemBySkuIdMethod;
    public static String getInventoryMethod;
    public static String itemSkuDiscount;
    public static String paidOrderMethod;
    public static String cancelOrderMethod;
    public static String confirmOrderMethod;
    public static String getOrderMethod;
    public static String registerCallbackMethod;
    public static String getCallBackMethod;
    public static String mackApiPathPrefix;
    public static String mockCallbackCancelOrder;
    public static String mockCallbackAuditCancelOrder;
    public static String mockCallbackDeliveryOrder;
    public static String mockCallbackRefundAddress;
    public static String refundOrderApplyMethod;
    //渠道取消售后服务请求
    public static String refundOrderCancelMethod;
    //触发严选拒绝退货回调API
    public static String mockCallbackRefundReject;
    //ERP绑定售后售后寄回物流单号
    public static String refundOrderOfferExpress;
    //EPP查询严选售后申请详情
    public static String refundOrderDetail;
    // 触发退货包裹确认收货回调
    public static String callbackRefundExpressConfirm;
    // 触发严选系统取消退货回调
    public static String callbackRefundSystemCancel;
    // 触发直接退款结果回调
    public static String callbackRefundResultDirectly;
    // 触发退货包裹确认收货后退款结果回调
    public static String callbackRefundResultWithExpress;
    @Value("${yanxuan.appKey}")
    public void setAppKey(String appKey) {
        YxConfig.appKey = appKey;
    }

    @Value("${yanxuan.appSecret}")
    public void setAppSecret(String appSecret) {
        YxConfig.appSecret = appSecret;
    }

    @Value("${yanxuan.host}")
    public void setYxOpenApiHost(String yxOpenApiHost) {
        YxConfig.yxOpenApiHost = yxOpenApiHost;
    }

    @Value("${yanxuan.path}")
    public void setPath(String path) {
        YxConfig.path = path;
    }

    @Value("${yanxuan.openApi.method.getIds}")
    public void setGetMethodIds(String getMethodIds) {
        YxConfig.getMethodIds = getMethodIds;
    }

    @Value("${yanxuan.openApi.method.getItems}")
    public void setGetMethodItems(String getMethodItems) {
        YxConfig.getMethodItems = getMethodItems;
    }

    @Value("${yanxuan.openApi.method.getItemBySkuId}")
    public void setGetItemBySkuIdMethod(String getItemBySkuIdMethod) {
        YxConfig.getItemBySkuIdMethod = getItemBySkuIdMethod;
    }

    @Value("${yanxuan.openApi.method.getInventory}")
    public void setGetInventoryMethod(String getInventoryMethod) {
        YxConfig.getInventoryMethod = getInventoryMethod;
    }

    @Value("${yanxuan.openApi.method.paidOrder}")
    public void setPaidOrderMethod(String paidOrderMethod) {
        YxConfig.paidOrderMethod = paidOrderMethod;
    }

    @Value("${yanxuan.openApi.method.cancelOrder}")
    public void setCancelOrderMethod(String cancelOrderMethod) {
        YxConfig.cancelOrderMethod = cancelOrderMethod;
    }

    @Value("${yanxuan.openApi.method.confirmOrder}")
    public void setConfirmOrderMethod(String confirmOrderMethod) {
        YxConfig.confirmOrderMethod = confirmOrderMethod;
    }

    @Value("${yanxuan.openApi.method.getOrder}")
    public void setGetOrderMethod(String getOrderMethod) {
        YxConfig.getOrderMethod = getOrderMethod;
    }

    @Value("${yanxuan.openApi.method.registerCallback}")
    public void setRegisterCallbackMethod(String registerCallbackMethod) {
        YxConfig.registerCallbackMethod = registerCallbackMethod;
    }

    @Value("${yanxuan.openApi.method.getCallBack}")
    public void setGetCallBackMethod(String getCallBackMethod) {
        YxConfig.getCallBackMethod = getCallBackMethod;
    }

    @Value("${yanxuan.openApi.mackApi.path.prefix}")
    public void setMackApiPathPrefix(String mackApiPathPrefix) {
        YxConfig.mackApiPathPrefix = mackApiPathPrefix;
    }

    @Value("${yanxuan.openApi.mackApi.method.callbackCancelOrder}")
    public void setMockCallbackCancelOrder(String mockCallbackCancelOrder) {
        YxConfig.mockCallbackCancelOrder = mockCallbackCancelOrder;
    }

    @Value("${yanxuan.openApi.mackApi.method.callbackAuditCancelOrder}")
    public void setMockCallbackAuditCancelOrder(String mockCallbackAuditCancelOrder) {
        YxConfig.mockCallbackAuditCancelOrder = mockCallbackAuditCancelOrder;
    }

    @Value("${yanxuan.openApi.mackApi.method.callbackDeliveryOrder}")
    public void setMockCallbackDeliveryOrder(String mockCallbackDeliveryOrder) {
        YxConfig.mockCallbackDeliveryOrder = mockCallbackDeliveryOrder;
    }

    @Value("${yanxuan.openApi.mackApi.method.callbackRefundAddress}")
    public void setMockCallbackRefundAddress(String mockCallbackRefundAddress) {
        YxConfig.mockCallbackRefundAddress = mockCallbackRefundAddress;
    }

    @Value("${yanxuan.openApi.method.refundOrderApply}")
    public void setRefundOrderApplyMethod(String refundOrderApplyMethod) {
        YxConfig.refundOrderApplyMethod = refundOrderApplyMethod;
    }
    @Value("${yanxuan.openApi.method.refundOrderCancel}")
    public void setRefundOrderCancelMethod(String refundOrderCancelMethod) {
        YxConfig.refundOrderCancelMethod = refundOrderCancelMethod;
    }
    @Value("${yanxuan.openApi.mackApi.method.callbackRefundReject}")
    public  void setMockCallbackRefundReject(String mockCallbackRefundReject) {
        YxConfig.mockCallbackRefundReject = mockCallbackRefundReject;
    }
    @Value("${yanxuan.openApi.method.refundOrderOfferExpress}")
    public  void setRefundOrderOfferExpress(String refundOrderOfferExpress) {
        YxConfig.refundOrderOfferExpress = refundOrderOfferExpress;
    }
    @Value("${yanxuan.openApi.method.refundOrderDetail}")
    public  void setRefundOrderDetail(String refundOrderDetail) {
        YxConfig.refundOrderDetail = refundOrderDetail;
    }

    @Value("${yanxuan.openApi.mackApi.method.callbackRefundExpressConfirm}")
    public void setCallbackRefundExpressConfirm(String callbackRefundExpressConfirm) {
        YxConfig.callbackRefundExpressConfirm = callbackRefundExpressConfirm;
    }

    @Value("${yanxuan.openApi.mackApi.method.callbackRefundSystemCancel}")
    public  void setCallbackRefundSystemCancel(String callbackRefundSystemCancel) {
        YxConfig.callbackRefundSystemCancel = callbackRefundSystemCancel;
    }

    @Value("${yanxuan.openApi.mackApi.method.callbackRefundResultDirectly}")
    public void setCallbackRefundResultDirectly(String callbackRefundResultDirectly) {
        YxConfig.callbackRefundResultDirectly = callbackRefundResultDirectly;
    }

    @Value("${yanxuan.openApi.mackApi.method.callbackRefundResultWithExpress}")
    public  void setCallbackRefundResultWithExpress(String callbackRefundResultWithExpress) {
        YxConfig.callbackRefundResultWithExpress = callbackRefundResultWithExpress;
    }

    @Value("${yanxuan.openApi.method.itemSkuDiscount}")
    public  void setItemSkuDiscount(String itemSkuDiscount) {
        YxConfig.itemSkuDiscount = itemSkuDiscount;
    }
}
